import request from '@/utils/request'

//获取用户收藏菜品接口
export const getCollectDishAPI = () => {
  return request({
    url: '/user/collect/show',
    method: 'GET'
  })
}

//添加用户收藏菜品接口
export const addCollectDishAPI = (dishId) => {
  return request({
    url: '/user/collect/add',
    method: 'POST',
    data: { dishId }
  })
}

//删除用户收藏菜品接口
export const deleteCollectDishAPI = (dishIds) => {
  return request({
    url: '/user/collect/delete',
    method: 'DELETE',
    data: { dishIds }
  })
}

//判断用户是否收藏该菜品
export const isCollectDishAPI = (userId,dishId) => {
  return request({
    url: '/user/collect/exit',
    method:'GET',
    data:{
      userId,
      dishId
    }
  })
}
